# Python3.7官网镜像
FROM python:3.7.3
# 将脚本文件移到指定目录
ADD script/* /usr/local/bin/script/
# 测试文件对象的目录
COPY file/test /usr/local/bin/file/test

# 安装node.js
ADD file/node-v14.15.4-linux-x64.tar.xz /opt/
ENV PATH=$PATH:/opt/node-v14.15.4-linux-x64/bin

#安装python依赖包and gloabl eslint
RUN pip install jsonpath \
    && pip install pyyaml \
    && npm install -g eslint

WORKDIR /usr/local/bin/script

#安装eslint相关依赖
RUN npm install
# 容器启动后执行命令, 运行py脚本
CMD ["python", "/usr/local/bin/script/eslint_check.py"]
